package com.baike.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author:pjm
 * //学生(用户)评论,用于mongodb
 */
@Data
@Accessors(chain = true)
public class MongodbComment implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "评论id")
    @Id
    private Long commentId;

    @ApiModelProperty(value = "课程id")
    private Integer lessonId;

    @ApiModelProperty(value = "评论人(学生)id")
    private Integer studentId;

    @ApiModelProperty(value = "评论内容")
    private String commentContent;

    @ApiModelProperty(value = "评论时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date commentDatetime;

    @ApiModelProperty(value = "课程评分")
    private Integer lessonScore;

    @ApiModelProperty(value = "点赞量")
    private Integer commentSupport;

    @ApiModelProperty(value = "是否公开 0,否 1,是")
    private Integer privates;
}
